package com.example.keli.ui.area;

import android.os.Parcel;
import android.os.Parcelable;

import com.amap.api.location.AMapLocation;

/**
 * description $desc$
 * created by jerry on 2019/3/21.
 */
public class AreaVO implements Parcelable {

    /**
     * id : 39
     * pid : 37
     * name : 济南市
     * pinyin : J
     * is_user_region : true
     * is_activity : true
     * is_popular : true
     */

    private int id;
    private int pid;
    private String name;
    private String pinyin;
    private String is_user_region;
    private String is_activity;
    private String is_popular;
    private AMapLocation aMapLocation;

    public AMapLocation getaMapLocation() {
        return aMapLocation;
    }

    public void setaMapLocation(AMapLocation aMapLocation) {
        this.aMapLocation = aMapLocation;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPinyin() {
        return pinyin;
    }

    public void setPinyin(String pinyin) {
        this.pinyin = pinyin;
    }

    public String getIs_user_region() {
        return is_user_region;
    }

    public void setIs_user_region(String is_user_region) {
        this.is_user_region = is_user_region;
    }

    public String getIs_activity() {
        return is_activity;
    }

    public void setIs_activity(String is_activity) {
        this.is_activity = is_activity;
    }

    public String getIs_popular() {
        return is_popular;
    }

    public void setIs_popular(String is_popular) {
        this.is_popular = is_popular;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeInt(this.pid);
        dest.writeString(this.name);
        dest.writeString(this.pinyin);
        dest.writeString(this.is_user_region);
        dest.writeString(this.is_activity);
        dest.writeString(this.is_popular);
        dest.writeParcelable(this.aMapLocation, flags);
    }

    public AreaVO() {
    }

    protected AreaVO(Parcel in) {
        this.id = in.readInt();
        this.pid = in.readInt();
        this.name = in.readString();
        this.pinyin = in.readString();
        this.is_user_region = in.readString();
        this.is_activity = in.readString();
        this.is_popular = in.readString();
        this.aMapLocation = in.readParcelable(AMapLocation.class.getClassLoader());
    }

    public static final Parcelable.Creator<AreaVO> CREATOR = new Parcelable.Creator<AreaVO>() {
        @Override
        public AreaVO createFromParcel(Parcel source) {
            return new AreaVO(source);
        }

        @Override
        public AreaVO[] newArray(int size) {
            return new AreaVO[size];
        }
    };
}
